package com.ruoyi.activity.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.ruoyi.activity.domain.ActFunFormRel;
import com.ruoyi.activity.mapper.ActFunFormRelMapper;
import com.ruoyi.activity.service.IActFunFormRelService;
import com.ruoyi.common.exception.ServiceException;
import com.ruoyi.common.utils.StringUtils;
import org.springframework.stereotype.Service;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author chenyufeng
 * @since 2024-03-02
 */
@Service
public class ActFunFormRelServiceImpl extends ServiceImpl<ActFunFormRelMapper, ActFunFormRel> implements IActFunFormRelService {

    @Override
    public ActFunFormRel getflowKeyByFunctionelKey(String businessKey) {
        if(StringUtils.isBlank(businessKey)){
            throw new ServiceException("功能标识不能为空！");
        }
        return getOne(new LambdaQueryWrapper<ActFunFormRel>()
                .eq(ActFunFormRel::getFunUniqueStr, businessKey));
    }
}
